package spc.webos.queue;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

public class QueueMessage implements Serializable {
	private static final long serialVersionUID = 1L;
	public byte[] messageId;
	public byte[] correlationId;
	public int ccsid = 1208;
	public int persistence;
	public Date putDateTime;
	public int feedback;
	public String applicationIdData;
	public String applicationOriginData;
	public String putAppName;
	public int priority;
	public String replyToQ;
	public String replyToQMgr;
	public int report;
	public int expirySeconds;
	public byte[] buf;
	public long inBufTime;
	public String sn;
	public Object msg;
	public String qname;
	public Map qmprops;
	public Map attribute;
	public Object mqmsg;
	public long createTm = System.currentTimeMillis();

	public QueueMessage() {
	}

	public QueueMessage(byte[] buf) {
		this.buf = buf;
	}

	public QueueMessage(byte[] buf, byte[] correlationId, byte[] messageId) {
		this(buf, correlationId, messageId, 0, null);
	}

	public QueueMessage(byte[] buf, byte[] correlationId, byte[] messageId,
			String qname) {
		this(buf, correlationId, messageId, 0, qname);
	}

	public QueueMessage(byte[] buf, byte[] correlationId, byte[] messageId,
			int expirySeconds) {
		this(buf, correlationId, messageId, expirySeconds, null);
	}

	public QueueMessage(byte[] buf, byte[] correlationId, byte[] messageId,
			int expirySeconds, String qname) {
		this.buf = buf;
		this.correlationId = correlationId;
		this.messageId = messageId;
		this.expirySeconds = expirySeconds;
		this.qname = qname;
		this.createTm = System.currentTimeMillis();
	}

	public QueueMessage(Object obj, byte[] buf, String sn,
			byte[] correlationId, byte[] messageId, int expirySeconds) {
		this.msg = obj;
		this.buf = buf;
		this.sn = sn;
		this.messageId = messageId;
		this.correlationId = correlationId;
		this.expirySeconds = expirySeconds;
		this.createTm = System.currentTimeMillis();
	}

	public QueueMessage(Object obj, byte[] buf, String sn,
			byte[] correlationId, byte[] messageId) {
		this.msg = obj;
		this.buf = buf;
		this.sn = sn;
		this.messageId = messageId;
		this.correlationId = correlationId;
	}

	public byte[] getMessageId() {
		return this.messageId;
	}

	public void setMessageId(byte[] messageId) {
		this.messageId = messageId;
	}

	public byte[] getCorrelationId() {
		return this.correlationId;
	}

	public void setCorrelationId(byte[] correlationId) {
		this.correlationId = correlationId;
	}

	public byte[] getBuf() {
		return this.buf;
	}

	public void setBuf(byte[] buf) {
		this.buf = buf;
	}

	public long getInBufTime() {
		return this.inBufTime;
	}

	public void setInBufTime(long inBufTime) {
		this.inBufTime = inBufTime;
	}

	public int getExpirySeconds() {
		return this.expirySeconds;
	}

	public void setExpirySeconds(int expirySeconds) {
		this.expirySeconds = expirySeconds;
	}

	public String getSn() {
		return this.sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public Object getMsg() {
		return this.msg;
	}

	public void setMsg(Object msg) {
		this.msg = msg;
	}

	public String getQname() {
		return this.qname;
	}

	public void setQname(String qname) {
		this.qname = qname;
	}

	public Map getAttribute() {
		return this.attribute;
	}

	public void setAttribute(Map attribute) {
		this.attribute = attribute;
	}

	public Date getPutDateTime() {
		return this.putDateTime;
	}

	public void setPutDateTime(Date putDateTime) {
		this.putDateTime = putDateTime;
	}

	public int getFeedback() {
		return this.feedback;
	}

	public void setFeedback(int feedback) {
		this.feedback = feedback;
	}

	public String getApplicationIdData() {
		return this.applicationIdData;
	}

	public void setApplicationIdData(String applicationIdData) {
		this.applicationIdData = applicationIdData;
	}

	public String getApplicationOriginData() {
		return this.applicationOriginData;
	}

	public void setApplicationOriginData(String applicationOriginData) {
		this.applicationOriginData = applicationOriginData;
	}

	public String getPutAppName() {
		return this.putAppName;
	}

	public void setPutAppName(String putAppName) {
		this.putAppName = putAppName;
	}

	public int getPriority() {
		return this.priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public String getReplyToQ() {
		return this.replyToQ;
	}

	public void setReplyToQ(String replyToQ) {
		this.replyToQ = replyToQ;
	}

	public String getReplyToQMgr() {
		return this.replyToQMgr;
	}

	public void setReplyToQMgr(String replyToQMgr) {
		this.replyToQMgr = replyToQMgr;
	}

	public int getReport() {
		return this.report;
	}

	public void setReport(int report) {
		this.report = report;
	}
}
